package com.template.mongo.persistence.dao.impl;

import java.util.List;

import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Repository;

import com.template.mongo.persistence.dao.AccountDao;
import com.template.mongo.persistence.dao.base.GenericMongoBaseDaoImpl;
import com.template.mongo.persistence.entity.Account;
import com.template.mongo.utils.PagingInfo;

@Repository
public class AccountDaoImpl extends GenericMongoBaseDaoImpl<Account> implements
		AccountDao {

	public AccountDaoImpl() {
		super(Account.class);
	}
	
	@Override
	public Account findByUserName(String userName) {
		Query query = new Query(Criteria.where("userName").is(userName));
		return findOne(query);
	}

	@Override
	public List<Account> findByEmail(String email) {
		return null;
	}

	@Override
	public Account findByMobile(String mobile) {
		return null;
	}

	@Override
	public List<Account> findByLevel(int level) {
		return null;
	}

	@Override
	public List<Account> findByIsActive(short isActive) {
		return null;
	}

	@Override
	public boolean exists(String userName) {
		return false;
	}

	@Override
	public Account findUserByEmail(String email) {
		return null;
	}

	@Override
	public List<Account> findByuserName(String kw, PagingInfo pInfo) {
		return null;
	}

	@Override
	public List<Account> getUsers(String kw, long departmentId, PagingInfo pInfo) {
		return null;
	}

	@Override
	public boolean checkUserNameIgnore(String userName, String userNameOld) {
		return false;
	}
}
